using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace ns
{
    ///<summary>
    ///
    ///</summary>
    public static class TransformHelper 
    {
        public static Transform FindChildByName(this Transform parent, string childname)
        {
            Transform childtf=parent.Find(childname);
            if (childtf != null) return childtf;
            for (int i = 0; i < parent.childCount; i++)
            {
                childtf=FindChildByName(parent.GetChild(i), childname);
                if (childtf != null) return childtf;
            }
            return null;
        }
    }
}
